<?php

/**
 * Picture form.
 *
 * @package    wills
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class PictureForm extends BasePictureForm
{
  public function configure()
  {
	unset(
      $this['created_at'], 
      $this['updated_at']

    );


	$this->setWidget('contestant_id', new sfWidgetFormInputText());
		
	//照片
	$this->widgetSchema['picture'] = new sfWidgetFormInputFile();
    $this->validatorSchema['picture'] = new sfValidatorFile(array(
      'max_size' => 3 * 1024 * 1024,
      'path' => Wills::getUploadDirByWebPath(sfConfig::get('app_path_contestant_picture')),
      'mime_types' => 'web_images'
    ));
   


	$this->validatorSchema['picture']->setOption('required', true);
    $this->validatorSchema['picture']->setMessage('required', '请上传艺术照片');





  }
}
